//app.js
import GoEasy from './goeasy-1.0.6';

App({
  onLaunch: function () {
    //引入UI库
    wx.getSystemInfo({
      success: e => {
        this.globalData.StatusBar = e.statusBarHeight;
        let custom = wx.getMenuButtonBoundingClientRect();
        this.globalData.Custom = custom;
        this.globalData.CustomBar = custom.bottom + custom.top - e.statusBarHeight;
      }
    })
    this.globalData.goEasy = new GoEasy({
      host: "hangzhou.goeasy.io", //应用所在的区域地址: 【hangzhou.goeasy.io | singapore.goeasy.io】
      appkey: "BC-48712dc69e234a34b701545c954c64cf", //替换为您的应用appkey
      onConnected: function () {
        console.log('连接成功！')
      },
      onDisconnected: function () {
        console.log('连接断开！')
      },
      onConnectFailed: function (error) {
        console.log('连接失败或错误！')
      }
    });

  },
  globalData: {
    islogin:false,
    userinfo:[],
    id:'',
    goEasy:null,
    bgimg:'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1592371491273&di=b7d6808292bf11b556c032875b7367e6&imgtype=0&src=http%3A%2F%2Fb-ssl.duitang.com%2Fuploads%2Fitem%2F201509%2F27%2F20150927021111_fLS3Z.jpeg',

    login:[],
    AppId :"wx978a492eda6db690",
    AppSecret : '5ae82d1058f1d0e59ef0ad8c344c4f95',
    code:'',
    FriendCount: [],
    RoomCount: [],
    MessageCount: [],
    haveImg:false

  }
})